#if !defined BORROWRECORD_H
#define BORROWRECORD_H
#include <iostream>
using namespace std;
class BorrowRecord{
public:
	BorrowRecord(string reader_num="XXXXXXXXX", string book_num="XXXXXX",string borrow_time="0000-00-00",string return_time="0000-00-00",bool del_flag=false, string operator_num="XXXXXX",float fine=0);
    virtual ~BorrowRecord();

    string getNum();
    void setNum(string reader_num);

    string getBookNum();
    void setBookNum(string book_num);

    string getBorrowTime();
    void setBorrowTime(string return_time);

    string getReturnTime();
    void setReturnTime(string return_time);

	bool getDelFlag();
    void setRDelFlag(bool del_flag);

	string getOperatorNum();
    void setOperatorNum(string Operator_num);

    float getFine();
    void setFine(float fine);

	void BorrowRecordShow();


	void readFromFile(fstream &);
	void writeToFile(fstream &) const;
	friend istream& operator>>(istream &istrm, BorrowRecord &borrow_record);
	friend ostream& operator<<(ostream &ostrm,const BorrowRecord &borrow_record);

private:
    string readerNum;
    string bookNum;
    string borrowTime;
    string returnTime;
	bool delFlag;
	string operatorNum;
    float fine;

};

#endif // BORROWRECORD_H
